//
//  WithDrawlRecordListViewController.m
//  GLGW_Shoping
//
//  Created by whx on 2018/12/6.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "WithDrawlRecordListViewController.h"
#import "WithDrawlRecordViewModel.h"
#import "WithDrawlRecordDetailViewController.h"

@interface WithDrawlRecordListViewController ()
{
    WithDrawlRecordViewModel *viewModel;
}
@end

@implementation WithDrawlRecordListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    viewModel = [[WithDrawlRecordViewModel alloc] initWithViewToViewModel:self.tableView theSuperView:self.view];
    viewModel.withDrawRecordType = self.withDrawRecordType;
    kWeakSelf(self);
    viewModel.BlockWithDrawlDetail = ^(NSIndexPath * _Nonnull index, NSString * _Nonnull recordStr) {
        [weakself selecDetilWithIndexPath:index str:recordStr];
    };
}

- (void)selecDetilWithIndexPath:(NSIndexPath *)index str:(NSString *)str
{
    // 进去详情页
    WithDrawlRecordDetailViewController *vc = [WithDrawlRecordDetailViewController new];
    vc.withDrawRecordType = self.withDrawRecordType;
    [self.navigationController pushViewController:vc animated:YES];
}

@end
